﻿package utils

import "encoding/json"

func Build(code int, msg string, data interface{}) (string, error) {
	m := make(map[string]interface{})
	m["code"] = code
	m["message"] = msg
	m["data"] = data
	marshal, err := json.Marshal(m)
	return string(marshal), err
}
